Skip to content

Add support for prepared statements (issue #75)#292

Open
nicolas-geysse wants to merge 1456 commits intocwida:mainfrom
theseedship:fix/issue-75-prepared-statements
Open

Add support for prepared statements (issue #75)#292
nicolas-geysse wants to merge 1456 commits intocwida:mainfrom
theseedship:fix/issue-75-prepared-statements

Conversation

@nicolas-geysse
Copy link

Summary

  • Add handlers for PREPARE_STATEMENT and EXECUTE_STATEMENT in duckpgq_parser.cpp
  • Fix std::move() issues in summarize_property_graph.cpp for unique_ptr returns
  • Add test file test/sql/prepared_statements.test

Fixes #75

Implementation Details

The fix involves adding a case in duckpgq_handle_statement() that extracts the inner statement from a PrepareStatement and recursively processes it. This allows graph queries inside PREPARE to be properly transformed.

For EXECUTE statements, we simply throw a binder exception to let DuckDB's core handle the execution of the prepared statement.

Test plan

  • Basic PREPARE with GRAPH_TABLE query
  • EXECUTE the prepared query
  • PREPARE with path finding
  • DEALLOCATE works
  • All 59 existing tests pass (4301 assertions)

🤖 Generated with Claude Code

Dtenwolde and others added 30 commits January 28, 2025 09:52
…on-weakly-connected-component

Rework WCC implementation
…when-match-used-in-subquery

Fix segmentation fault when match was used inside subquery
[still fixing some issues with aliases]
…for-get_csr_v-and-get_csr_e

Fix segmentation faults in csr v and e functions
Improve template bootstraper script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support prepared statements